﻿@using Neocean.Mpa.Web.Startup
@model Neocean.Mpa.Web.Models.MusicStore.MovieListViewModel
@{
    ViewBag.CurrentPageName = PageNames.Movies; // The menu item will be active for this page.
}
@*<h2>@L("MovieList")</h2>*@

@*<div class="row">
    <div>
        <ul class="list-group" id="TaskList">
            @foreach (var movie in Model.Movies)
            {
                <li class="list-group-item">
                    <h4 class="list-group-item-heading">@movie.Title</h4>
                    <div class="list-group-item-text">
                        @movie.CreationTime.ToString("yyyy-MM-dd HH:mm:ss")
                    </div>
                </li>
            }
        </ul>
    </div>
</div>*@

<div class="row clearfix">
    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
        <div class="card">
            <div class="header">
                <h2>
                    @L("Movies")
                </h2>
                <ul class="header-dropdown m-r--5">
                    <li class="dropdown">
                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                            <i class="material-icons">more_vert</i>
                        </a>
                        <ul class="dropdown-menu pull-right">
                            <li><a id="RefreshButton" href="javascript:void(0);" class="waves-effect waves-block"><i class="material-icons">refresh</i>@L("Refresh")</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            <div class="body table-responsive">
                <table class="table">
                    <thead>
                        <tr>
                            <th>@L("MovieTitle")</th>
                            <th>@L("MovieGenre")</th>
                            <th>@L("Actions")</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var movie in Model.Movies)
                        {
                            <tr>
                                <td>@movie.Title</td>
                                <td>@movie.Genre</td>
                                <td class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                        <i class="material-icons">menu</i>
                                    </a>
                                    <ul class="dropdown-menu pull-right">
                                        <li><a href="#" class="waves-effect waves-block edit-role" data-role-id="@movie.Id" data-toggle="modal" data-target="#RoleEditModal"><i class="material-icons">edit</i>@L("Edit")</a></li>
                                        <li><a href="#" class="waves-effect waves-block delete-role" data-role-id="@movie.Id" data-role-name="@movie.Title"><i class="material-icons">delete_sweep</i>@L("Delete")</a></li>
                                    </ul>
                                </td>
                            </tr>
                        }
                    </tbody>
                </table>
                <button type="button" class="btn btn-primary btn-circle waves-effect waves-circle waves-float pull-right" data-toggle="modal" data-target="#RoleCreateModal">
                    <i class="material-icons">add</i>
                </button>
            </div>
        </div>
    </div>
</div>